Set Environment Variables - TOMEE

For Windows deployment we need to create setenv.bat file in the bin folder of extracted TomEE directory.

For Linux deployment we need to create setenv.sh file in the bin folder of extracted TomEE directory.

The following configuration needs to be placed in the setenv.bat file for Windows environment.

Windows arguments

set CATALINA_OPTS=-Xms4096m -Xmx4096m -XX:+UseG1GC

-Dtangosol.coherence.cacheconfig="C:/Servers/TomEE/SLInstance/shared/conf/service-coherence-cache-config.xml"

-Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml

-Dtangosol.coherence.override="C:/Servers/TomEE/SLInstance/shared/conf/service-coherence-config.xml"

-Doracle.jdbc.fanEnabled=false

-Djava.util.logging.config.file="C:/Servers/TomEE/SLInstance/shared/conf/logging.properties"

-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

-Dtangosol.coherence.distributed.localstorage=true -Dserver.name="<Name of the server>"

set OIPA_KEYSTORE_PWD=changeit

Note: Each argument should be separated by space and not the next line (Enter).

For Linux environment in setenv.sh

Linux arguments

export CATALINA_OPTS="-Xms4096m -Xmx4096m -XX:+UseG1GC

-Dtangosol.coherence.cacheconfig=/Servers/TomEE/SLInstance/shared/conf/service-coherence-cache-config.xml

-Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml

-Dtangosol.coherence.override=/Servers/TomEE/SLInstance/shared/conf/service-coherence-config.xml

-Doracle.jdbc.fanEnabled=false -Djava.util.logging.config.file=/Servers/TomEE/SLInstance/shared/conf/logging.properties

-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

-Dtangosol.coherence.distributed.localstorage=true

-Dserver.name=<Name of the server>"

export OIPA_KEYSTORE_PWD="changeit"

Note:

1. To enable remote debugging

Debug

-agentlib:jdwp=transport=dt_socket,address=1044,server=y,suspend=n

2. To enable JMX events to Admin console application

Add to existing class path
-Dcom.sun.management.jmxremote.ssl=false

-Dcom.sun.management.jmxremote.authenticate=false

-Dcom.sun.management.jmxremote.autodiscovery=true

-Dcom.sun.management.jmxremote.port=<Unique Port Number>

If servers JMX port is not getting exposed to jconsole or adminconsole use below argument as well in that server arguments. ip address should be server actual IP address.

RMI Port

-Djava.rmi.server.hostname=ipaddress